
names = ["james", "william", "alexander", "benjamin", "michael", "emily", "taylor"] 
transportations = ["car", "bus", "motorcycle", "bike", "train", "metro"]

print("test1=====>")
for name in names:
    print(name.title())


print("\ntest2=====>")
for name in names:
    print(name.title() + ": hello, how's it going!")

print("\ntest3=====>")
for tran in transportations:
    print("I would like to own a ", tran.title())



print("\ntest4=====>")
for name in names:
    print("hello " + name.title() + ", would you like to join me for the dinner?")

print("\ntest5=====>")
poped_name = names.pop(0)
names.insert(0, "libai")
print(poped_name.title() + " can not join the dinner! so libai join the dinner.")
print("so last names is: \n") 
for name in names:
    print(name.title() + "\n") 

print("\ntest6=====>")
print("I found a bigger restaurant where I can invite more people.")
names.insert(0, "dupu")
names.insert(4, "wangwei")
names.append("sushi")
print("so last names is: \n") 
for name in names:
    print(name.title() + "\n") 


print("\ntest7=====>")
while(len(names) > 2):
    poped_name = names.pop()
    print(poped_name.title() + " can not join the dinner!")

print("For various reasons, many people are unable to attend the dinner party. so last names is: \n")
for name in names:
    print(name.title() + "\n") 

print("\ntest8=====>")
print("\nthe dinner is end.")
del names[0]
del names[0]
print(names)
